package com.serviportales.serviquality.maestroPlantillas.beans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.AbortProcessingException;

import com.icesoft.faces.component.paneltabset.TabChangeEvent;
import com.serviportales.serviportales.frontController.FCTabs;

@ManagedBean(name = "fcTabsPlantilla", eager = true)
@ViewScoped
public class FCTabsPlantilla extends FCTabs {

	private static final long serialVersionUID = 1L;
	public static int INDEX_MAESTRO_PLANTILLA = 0;
	public static int INDEX_CONFIGURAR_PLANTILLA = 1;

	private boolean tabbedMaestroPlantillaVisible;
	private boolean tabbedConfigurarPlantillaVisible;

	public FCTabsPlantilla() {
		this.tabbedMaestroPlantillaVisible = true;
		this.tabbedConfigurarPlantillaVisible = false;
	}

	public boolean isTabbedMaestroPlantillaVisible() {
		return tabbedMaestroPlantillaVisible;
	}

	public void setTabbedMaestroPlantillaVisible(boolean tabbedMaestroPlantillaVisible) {
		this.tabbedMaestroPlantillaVisible = tabbedMaestroPlantillaVisible;
	}

	public boolean isTabbedConfigurarPlantillaVisible() {
		return tabbedConfigurarPlantillaVisible;
	}

	public void setTabbedConfigurarPlantillaVisible(boolean tabbedConfigurarPlantillaVisible) {
		this.tabbedConfigurarPlantillaVisible = tabbedConfigurarPlantillaVisible;
	}

	@Override
	public void processTabChange(TabChangeEvent tabChangeEvent) throws AbortProcessingException {
//		if (tabChangeEvent.getNewTabIndex() == INDEX_CONFIGURAR_PLANTILLA) {
//			tabbedConfigurarPlantillaVisible = false;
//		}
	}
}
